/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * All Rights Researved.
 *
 * This library is developed and distributed for free usage,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * You can redistribute and/or modify it under the terms of the
 * Simplified BSD License
 *
 *
 *
 *
 *
 *
 *
 *
 * @author: jin Chen 
 * @date: Aug 13, 2003$
 * @version: 1.0
 */
package edu.psu.geovista.app.pcp.plot.control;

import javax.swing.*;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;

public abstract class BasicCfg extends JPanel
        implements ComponentListener{
    protected  ConfigManager owner;
    
    public void componentResized(ComponentEvent e) {
    }

    public void componentMoved(ComponentEvent e) {
    }
    //when never switch the tab, update view
    public void componentShown(ComponentEvent e) {
        updateView();
    }

    public void componentHidden(ComponentEvent e) {
    }
    public void updateView() {
        initValue();
    }
    protected  abstract void initValue();

    public ConfigManager getOwner() {
        return owner;
    }

    public Object getSetting(String name){
        return this.owner.getConfigSetting(name);
    }
}
